package com.zxc.demo4.advice;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;


/**
  * @author: zxc
  * @return:
  * @time:  2021/5/17 16:48
  * @description: 后置增强
  */
public class AfterMethod implements AfterReturningAdvice {
    @Override
        public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
            System.out.println("方法的后置增强");
        System.out.println("方法返回值"+returnValue);
            System.out.println("方法名:"+method.getName()+",方法参数列表"+ Arrays.toString(args));
    }
}
